# python模拟题


# 数字卡片游戏
def card(n1, n2):
    num1 = str(n1) + str(n2)
    num2 = str(n2) + str(n1)
    return int(num1) + int(num2)


# 比比绕口令
def letter(word, let):
    i = 0
    for l in word:
        if l == let:
            i += 1
    return i


# 密室大逃脱 水仙花数
def water(num):
    w = ''
    for i in range(100, num + 1):
        n1 = int(str(i)[0])
        n2 = int(str(i)[1])
        n3 = int(str(i)[2])
        if n1 ** 3 + n2 ** 3 + n3 ** 3 == i:
            w += str(i)
            w += ' '
            # print(i, end=' ')
        # print(n1,n2,n3)
    return w


# 素数知多少
def prime():
    # num = input()
    p = False
    i = 0
    # l = num.split(',')
    # print(l)
    l=[2,3,4,5,6,7,8,9,11]
    for j in l:
        j = int(j)
        if j == 2:
            p = True
        for k in range(2, j):
            if j % k == 0:
                p = False
                break
            else:
                p = True
                # print(j)
            print(p)
        if p:
            i += 1
    return i


if __name__ == '__main__':
    print(card(3, 5))
    print(letter('a bcdc1,_', 'c'))
    print(water(500))
    print(prime())
